/**
 * Created by siguangyi on 17/4/7.
 */

$(function () {
    initcontrol();
    
    
    getElem("startTask").onclick=function () {
        var toolType = getElem("for_toolType").value;

        if(typeof(toolType) != "undefined" && toolType == 1) //个人工具
        {
            window.location.replace("/pages/transfers/getOpenId?key=1005"+"Y"+getElem("for_price").value+getElem("for_toolId").value + encodeURI(encodeURI(getElem("for_toolName").value)));
        }
    }

    getElem("startOutTask").onclick=function() {
        var toolType = getElem("for_toolType").value;
        if(typeof(toolType) != "undefined" && toolType == 1) //个人工具
        {
            window.location.replace("/pages/transfers/getOpenId?key=1005"+"N"+getElem("for_price").value+getElem("for_toolId").value + encodeURI(encodeURI(getElem("for_toolName").value)));
        }
    }
})

function initcontrol() {
    var toolType = getElem("for_toolType").value;
    if(typeof(toolType) != "undefined" && toolType == 1) //个人工具
    {
        $("#startTask").css("display","inline-block");
        $("#startOutTask").css("display","block");
    }
    else
    {
        $("#startTask").css("display","none");
        $("#startOutTask").css("display","none");
    }
}

function initWechatInfo() {
    //getweChatSign();
    //setShareData(getElem("for_toolName").value,getElem("for_toolIntroduce").value,window.location.href,getElem("for_toolSmallImg").value);
    //weChat_hideMenuItemsStyle1();
}